﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace envir2plotwatt.GUI.Configuration
{
    public partial class PlotWattConfiguration : Form
    {
        public string UserName { get; set; }
        public string Password { get; set; }
        public bool EnableUpload { get; set; }

        public PlotWattConfiguration()
        {
            InitializeComponent();
        }

        private void btnAccept_Click(object sender, EventArgs e)
        {
            Password = _password.Text;
            UserName = _userName.Text;
            EnableUpload = _enableUpload.Checked;

            DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        private void PlotWattConfiguration_Shown(object sender, EventArgs e)
        {
            _password.Text = Password;
            _userName.Text = UserName;
            _enableUpload.Checked = EnableUpload;
        }
    }
}
